In traffic management systems of packet switches, packet schedulers often dedicate a committed amount of bandwidth to each packet flow, while allowing it to also use additional bandwidth when available. In such a system, each packet is considered as “in-profile” if it conforms to the committed bandwidth or “out-of-profile” if it is outside of the committed bandwidth. The packet's profile state (i.e., in-profile or out-of-profile status) is one type of quality-of-service (QoS) information that can be marked in a packet header. This profile-state marking can be used downstream if congestion is encountered so that out-of-profile packets may be discarded, thereby ensuring that the committed bandwidth can be achieved end-to-end.
In existing systems, a separate circuit is used to measure the rate at which a packet queue is being granted by the scheduler, and to mark bits in the packet headers according to the queue's committed rate. Since a circuit is required for each packet queue, such a profile-marking system may be quite expensive to implement.
Alternatively, in a network-processor based implementation, the queue rate measurement may be performed in the network-processor code. However, extra expense is still incurred in the form of extra computational cycles in the processor, thereby lowering the overall performance of the switch.